package com.example.javaweb;



import java.util.HashMap;
import java.util.Map;

public class DBUser {

    private static Map<String, User> users=new HashMap<>();
    static {
        users.put("psy",new User("psy","1234546","123456","psy@123.com"));
    }
    public static User getUser(String username){
        User user = users.get(username);
        return user;
    }
    //添加
    public static boolean insert(User user){
        String username = user.getUsername();
        users.put(username,user);
        return true;
    }
}

